import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"
// 月生产状况查询
export const MonthlyQuery = (month:string,deptFlag:string,parms:any) => {
    return service.put<any,any>(`/bioDeptWrok/getProdMonthQuery?month=${month}&deptFlag=${deptFlag}`,parms)
}

// 月生产删除
export const deleteMonth = (month:string,seqNo:string) => {
    return LoginWork.post<any,any>(`/bioDeptWrok/prodMonthDelete?month=${month}&seqNo=${seqNo}`)
}

// 月新增
export const updateMonth = (parms:any) => {
    return LoginWork.put<any,any>(`/bioDeptWrok/prodMonthAdd`,parms)
}

// 人均查询
export const personQuery = () => {
    return service.get<any,any>(`/bioDeptWrok/getProdPersonQuery`)
}

// 周生产状况
export const weekQuery = () => {
    return service.get<any,any>(`/bioDeptWrok/getProdWeekQuery`)
}

// 周生产状况
export const WeeklyTargetQuery = () => {
    return service.get<any,any>(`/bioDeptWrok/getProTarDefQuery`)
}

// 周新增
export const AddWeeklyTarget = (parms:any) => {
    return LoginWork.post<any,any>(`/bioDeptWrok/proTarDefAdd?deptName=${parms.deptName}&weekTargetQty=${parms.weekTargetQty}`)
}

// 周新增
export const DeleteWeeklyTarget = (parms:any) => {
    return LoginWork.post<any,any>(`/bioDeptWrok/proTarDefDelete?deptName=${parms.deptName}&weekTargetQty=${parms.weekTargetQty}`)
}

// 放假日查询
export const HolidayInquiry = (month:string,parms:any) => {
    return service.put<any,any>(`/bioDeptWrok/getMonthHolidayQuery?dDate=${month}`,parms)
}

// 放假日期删除
export const deleteHolidayInquiry = (dDate:string) => {
    return LoginWork.post<any,any>(`/bioDeptWrok/MonthHolidayDelete?dDate=${dDate}`)
}

// 新增
export const AddHolidayInquiry = (dDate:string) => {
    return LoginWork.post<any,any>(`/bioDeptWrok/MonthHolidayAdd?dDate=${dDate}`)
}

// 产量日数查询
export const YieldQuery = (parms:any) => {
    return service.put<any,any>(`/bioDeptWrok/getkpiPersonQuery`,parms)
}

// 新增
export const AddYieldQuery = (parms:any) => {
    return LoginWork.put<any,any>(`/bioDeptWrok/kpiPersonAdd`,parms)
}

// 删除
export const DeleteYieldQuery = (parms:any) => {
    return LoginWork.post<any,any>(`/bioDeptWrok/kpiPersonDelete?deptType=${parms.deptType}&deptName=${parms.deptName}&dDate=${parms.dDate}`)
}
// 取资料
export const listupdate = (parms:any) => {
    return LoginWork.post<any,any>(`/bioDeptWrok/prodUpdate?month=${parms}`)
}